<!doctype html>
<html prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#"  lang="en" dir="ltr">
<head>
	<meta charset="UTF-8" />
	<title><?php echo $title; ?></title>
	<meta name="resource-type" content="document" />
	<meta name="robots" content="all, index, follow"/>
	<meta name="googlebot" content="all, index, follow" />
<?php
	foreach($meta as $name=>$content)
	{
		echo "\n\t\t";
		echo meta($name, $content);
	}
	echo "\n";

	if(!empty($canonical))
	{
		echo "\n\t\t";
		echo link_tag($canonical, 'canonical');
	}
	echo "\n\t";
?>
	<link rel="stylesheet" href="<?php echo base_url(); ?>assets/common/css/bootstrap.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo base_url(); ?>assets/common/css/bootstrap-theme.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo base_url(); ?>assets/common/css/icomoon.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo base_url(); ?>assets/common/css/bootstrap-datetimepicker.min.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo base_url(); ?>assets/<?= $this->output->template_name() ?>/css/main.css" type="text/css" />
<?php
	foreach($css as $file)
	{
	 	echo "\n\t\t";
		echo link_tag($file);
	} echo "\n\t";
?>
	<script type="text/javascript" src="<?php echo base_url(); ?>assets/common/js/jquery.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url(); ?>assets/common/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url(); ?>assets/common/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url(); ?>assets/common/js/bootstrap-datetimepicker.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url(); ?>assets/<?= $this->output->template_name() ?>/js/site.js"></script>
<?php
	foreach($js as $file)
	{
			echo "\n\t\t";
			?><script src="<?php echo $file; ?>"></script><?php
	} echo "\n\t";
	
	echo $inline_scripting;
?>

</head>
<body>
	<div id="wapper">
		<div id="main">
			<div class="container">
				<div id="messages-alert">
					<!-- AJAX -->
					<?= $this->messages->display() ?>
				</div>
				<?php if($this->load->get_section('text_header') != '') { ?>
					<h1><?php echo $this->load->get_section('text_header');?></h1>
				<?php }?>
				<?php echo $output;?>
				<?php echo $this->load->get_section('sidebar'); ?>
			</div>
		</div><!-- /#main -->
	</div>
	<script type="text/javascript">
		function reload_msg()
		{
			$('#messages-alert').load('<?= site_url('message') ?>');
		}
	</script>
</body>
</html>